import request from '@/utils/request'

// 查询合同列表
export function listContractInfo(query) {
  return request({
    url: '/contract/contractInfo/list',
    method: 'get',
    params: query
  })
}
// 查询合同列表
export function listOtherContractInfo(query) {
  return request({
    url: '/contract/contractInfo/other_list',
    method: 'get',
    params: query
  })
}

// 查询合同详细
export function getContractInfo(contractId) {
  return request({
    url: '/contract/contractInfo/' + contractId,
    method: 'get'
  })
}

// 新增合同
export function addContractInfo(data) {
  return request({
    url: '/contract/contractInfo',
    method: 'post',
    data: data
  })
}

// 修改合同
export function updateContractInfo(data) {
  return request({
    url: '/contract/contractInfo',
    method: 'put',
    data: data
  })
}

// 删除合同
export function delContractInfo(contractId) {
  return request({
    url: '/contract/contractInfo/' + contractId,
    method: 'delete'
  })
}


// 查询合同列表
export function listSigningList(query) {
  return request({
    url: '/contract/contractInfo/signingList',
    method: 'get',
    params: query
  })
}
// 合同签署
export function signContractSigning(signingId) {
  return request({
    url: '/contract/contractInfo/signContractSigning/' + signingId,
    method: 'post'
  })
}
